from libs.exception import BaseHTTPException
from flask_babel import gettext as _

class HPropParamError(BaseHTTPException):
    error_code = "prop_param_error"
    code = 400
    def __init__(self,message:str|None):
        message = message or ""
        self.description = _("Product property parameter error.{message}").format(message=message)
        super().__init__(self.description)

class HPropNotFoundError(BaseHTTPException):
    error_code = "prop_not_found_error"
    code = 400
    def __init__(self,prop_id:str|None):
        prop_id = prop_id or ""
        self.description = _("Product property not found error.{message}").format(message=prop_id)
        super().__init__(self.description)